<?php
/**
 * @author petranachbaur
 */
class ModelHelper {
   
    static public function modelToArray($model) {

        $modelArray = array();

        foreach($model as $m) {
                $modelArray[$m->id] = $m->name;
        }

        return $modelArray;
    }
    
    static public function amsModelToArray($model) {
        
        $modelArray = array();

        foreach($model as $m) {
                $modelArray[$m->ams_id] = $m->place;
        }

        return $modelArray;      
        
    }

}

?>